package cn.itcast.dtx.tccdemo.bank1.client;

import cn.itcast.dtx.tccdemo.bank1.client.fallback.Bank2Fallback;
import org.dromara.hmily.annotation.Hmily;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "tcc-demo-bank2", fallback = Bank2Fallback.class)
public interface Bank2Client {

    /**
     * 转账
     * @param amount
     * @return
     */
    @GetMapping("/bank2/transfer")
    @Hmily
    Boolean transfer(@RequestParam("amount") Double amount);
}


